<!--
 * @Author: zhangwenqiang
 * @Date: 2021-07-25 14:39:30
 * @LastEditors: OBKoro1
 * @LastEditTime: 2021-07-27 00:42:19
 * @FilePath: /operate/src/view/mainPage/leftMenu.vue
-->
<template>
  <div class=''>
    <div class="logo">
      <img src="@/assets/logo.png" alt="">
    </div>
    <el-menu default-active="1-1" class="el-menu-vertical-demo meunLeft" @open="handleOpen" @close="handleClose" :collapse="isCollapse">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span slot="title">商品管理</span>
        </template>
          <router-link :to="'/phyComManagement'"><el-menu-item index="1-1" >实物商品管理</el-menu-item></router-link>
          <router-link :to="'/sellGoodsManagement'"><el-menu-item index="1-2" >销售商品管理</el-menu-item></router-link>
          <router-link :to="'/overseasGoods'"><el-menu-item index="1-3" >海外仓产品管理管理</el-menu-item></router-link>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span slot="title">导航二</span>
        </template>
          <el-menu-item index="1-2">选项2</el-menu-item>
          <el-menu-item index="1-3">选项3</el-menu-item>
      </el-submenu>
      <el-menu-item index="3">
        <i class="el-icon-document"></i>
        <span slot="title">导航三</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-setting"></i>
        <span slot="title">导航四</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isCollapse: false
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>
<style scoped lang='scss'>
.logo{
  height: 50px;
  text-align: center;
  img{
    height: 100%;
  }
}
/deep/.el-menu{
  width: 170px;
  border: none;
  height: calc(100% - 50px);

}
/deep/.el-submenu__title{
  width: 190px;
  overflow: hidden;
  border-radius: 0 28px 28px 0;;
}
/deep/.el-menu-item{
  width: 190px;
}
.is-opened {
  /deep/.el-submenu__title{
  overflow: hidden;
  background: #3F54A1;
  border-radius: 0 28px 28px 0;;
  color: #fff;
  }
  i{
    color: #fff;
  }
}
/deep/.el-menu--inline{
  /deep/.el-submenu__title{
  background: #3F54A1;
  color: #fff;
  }
  i{
    color: #fff;
  }
}
/deep/.el-menu-item{
  border-radius:0 28px 28px 0;;
  overflow: hidden;
}
/deep/.el-submenu__title:hover{
  overflow: hidden;
  background-color:#3F54A1;
  color: #fff;
  border-radius:0 28px 28px 0;;
  i{
    color: #fff;
  }
}
/deep/.el-menu-item:hover{
  overflow: hidden;
  background-color:#3F54A1;
  color: #fff;
  border-radius:0 28px 28px 0;;
  i{
    color: #fff;
  }
}
// /deep/.el-menu-item:hover::after{
//   content:'';
//   padding: 1px 2px;
//   margin-left: 95px;
//   background:#3F54A1 ;
// }
/deep/.el-menu-item.is-active{
  overflow: hidden;
  background-color:#3F54A1;
  color: #fff;
  border-radius:0 28px 28px 0;;
  i{
    color: #fff;
  }
}
// /deep/.el-menu-item.is-active::after{
//   content:'';
//   padding: 1px 2px;
//   margin-left: 95px;
//   background:#3F54A1 ;
// }
.el-submenu{
  /deep/.el-menu {
    background: #F5F7FF;
  }
  /deep/.el-menu-item{
    color: #999999;
  }
  /deep/.el-menu-item:hover{
    overflow: hidden;
    background-color:transparent;
    color: #3F54A1;
    border-radius:0 28px 28px 0;;
    i{
      color: #fff;
    }
  }
  /deep/.el-menu-item.is-active{
    overflow: hidden;
    background-color:transparent;
    color: #3F54A1;
    border-radius:0 28px 28px 0;;
    i{
      color: #fff;
    }
  }
}
/deep/.el-submenu__icon-arrow{
  right: 40px;
  font-size: 18px;
}
</style>